package com.xhkj.componet;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import com.xhkj.hk.FaceStart;
import com.xhkj.hk.VehicleStart;

@Component
public class Runner implements CommandLineRunner {

	@Override
	public void run(String... args) throws Exception {
		FaceStart fs = new FaceStart();
		VehicleStart vs = new VehicleStart();
		// 单独线程启动人脸服务
//		Thread t1 = new Thread("faceThread") {
//			@Override
//			public void run() {
//				fs.start();
//			}
//		};

		// 单独线程启动车辆服务
		Thread t2 = new Thread("carThread") {
			@Override
			public void run() {
				vs.start();
			}
		};
//		t1.setPriority(1);
//		t1.start();
//		t2.setPriority(10);
		t2.start();
	}
}